const {getFileDir} = require("../utils");
const app = require("../app");
const loadAlgorithm = require("./load_algorithm");
import request from "../../utils/request";
const Toast = require("../dom/toast");
import store from "@/store"


module.exports = () => {
  const category = store.getters.currentCategory;
  const algorithm = store.getters.currentAlgorithm;

  request({
    url: `/algorithm/review/online`,
    method: 'post',
    data: {
      'category':category,
      'name': algorithm
    }
  }).then(res => {
    if (res.code == 200) {
      Toast.showInfoToast('上线成功');
    } else {
      Toast.showErrorToast('系统错误，上线失败');
    }
  });
};
